package com.weapp.common;

import cn.hutool.core.lang.UUID;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

public abstract class Response implements Serializable {
  private static final long serialVersionUID = -2587922050222537846L;
  @ApiModelProperty(value = "requestId", required = true)
  protected String requestId;
  @ApiModelProperty(value = "成功标志", required = true)
  protected boolean success;

  public Response() {
    this.success = Boolean.TRUE;
    this.requestId = UUID.randomUUID().toString();
  }

  public void setRequestId(final String requestId) {
    this.requestId = requestId;
  }

  public void setSuccess(final boolean success) {
    this.success = success;
  }

  public String getRequestId() {
    return this.requestId;
  }

  public boolean isSuccess() {
    return this.success;
  }
}